import numpy as np
# arr=np.array([[1,2,3,],[4,5,6,],[7,8,9,],[10,11,12]])
# print('4*3的整数数组:\n',arr)
# print('数组的ndim属性:',arr.ndim)
# print('数组的shape属性:',arr.shape)
# print('数组的size属性:',arr.size)
# print('数组的dtype属性：',arr.dtype)
#一维数组的索引和切片
arr=np.array([1,2,3,4,5,6,7,8,9])
print(arr[2])
print(arr[1:5])
print(arr[:8:2])
print(arr[::3])

